unit Androidapi.JNI.java.lang.Integer;

interface

uses
  Androidapi.JNIBridge, 
  Androidapi.JNI.JavaTypes;


type
// ===== Forward declarations =====

  JInteger = interface; //java.lang.Integer

// ===== Interface declarations =====

  JIntegerClass = interface(JNumberClass) // or JObjectClass // SuperSignature: java/lang/Number
  ['{8FC92138-04C9-48E1-82DA-FE82D7337CAF}']
    { static Property Methods }
    {class} function _GetMIN_VALUE: Integer; //I
    {class} function _GetMAX_VALUE: Integer; //I
    {class} function _GetTYPE: Jlang_Class; //Ljava/lang/Class;
    {class} function _GetSIZE: Integer; //I

    { static Methods }
    {class} function toString(P1: Integer; P2: Integer): JString; cdecl; overload; //(II)Ljava/lang/String;
    {class} function toHexString(P1: Integer): JString; cdecl; //(I)Ljava/lang/String;
    {class} function toOctalString(P1: Integer): JString; cdecl; //(I)Ljava/lang/String;
    {class} function toBinaryString(P1: Integer): JString; cdecl; //(I)Ljava/lang/String;
    {class} function toString(P1: Integer): JString; cdecl; overload; //(I)Ljava/lang/String;
    {class} function parseInt(P1: JString; P2: Integer): Integer; cdecl; overload; //(Ljava/lang/String;I)I
    {class} function parseInt(P1: JString): Integer; cdecl; overload; //(Ljava/lang/String;)I
    {class} function valueOf(P1: JString; P2: Integer): JInteger; cdecl; overload; //(Ljava/lang/String;I)Ljava/lang/Integer;
    {class} function valueOf(P1: JString): JInteger; cdecl; overload; //(Ljava/lang/String;)Ljava/lang/Integer;
    {class} function valueOf(P1: Integer): JInteger; cdecl; overload; //(I)Ljava/lang/Integer;
    {class} function init(P1: Integer): JInteger; cdecl; overload; //(I)V
    {class} function init(P1: JString): JInteger; cdecl; overload; //(Ljava/lang/String;)V
    {class} function getInteger(P1: JString): JInteger; cdecl; overload; //(Ljava/lang/String;)Ljava/lang/Integer;
    {class} function getInteger(P1: JString; P2: Integer): JInteger; cdecl; overload; //(Ljava/lang/String;I)Ljava/lang/Integer;
    {class} function getInteger(P1: JString; P2: JInteger): JInteger; cdecl; overload; //(Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/Integer;
    {class} function decode(P1: JString): JInteger; cdecl; //(Ljava/lang/String;)Ljava/lang/Integer;
    {class} function highestOneBit(P1: Integer): Integer; cdecl; //(I)I
    {class} function lowestOneBit(P1: Integer): Integer; cdecl; //(I)I
    {class} function numberOfLeadingZeros(P1: Integer): Integer; cdecl; //(I)I
    {class} function numberOfTrailingZeros(P1: Integer): Integer; cdecl; //(I)I
    {class} function bitCount(P1: Integer): Integer; cdecl; //(I)I
    {class} function rotateLeft(P1: Integer; P2: Integer): Integer; cdecl; //(II)I
    {class} function rotateRight(P1: Integer; P2: Integer): Integer; cdecl; //(II)I
    {class} function reverse(P1: Integer): Integer; cdecl; //(I)I
    {class} function signum(P1: Integer): Integer; cdecl; //(I)I
    {class} function reverseBytes(P1: Integer): Integer; cdecl; //(I)I

    { static Property }
    {class} property MIN_VALUE: Integer read _GetMIN_VALUE;
    {class} property MAX_VALUE: Integer read _GetMAX_VALUE;
    {class} property &TYPE: Jlang_Class read _GetTYPE;
    {class} property SIZE: Integer read _GetSIZE;
  end;

  [JavaSignature('java/lang/Integer')]
  JInteger = interface(JNumber) // or JObject // SuperSignature: java/lang/Number
  ['{C012E232-9D87-464A-9C1B-7B9006C9C3D1}']
    { Property Methods }

    { methods }
    function byteValue: Byte; cdecl; //()B
    function shortValue: Word; cdecl; //()S
    function intValue: Integer; cdecl; //()I
    function longValue: Int64; cdecl; //()J
    function floatValue: Single; cdecl; //()F
    function doubleValue: Double; cdecl; //()D
    function toString: JString; cdecl; overload; //()Ljava/lang/String;
    function hashCode: Integer; cdecl; //()I
    function equals(P1: JObject): Boolean; cdecl; //(Ljava/lang/Object;)Z
    function compareTo(P1: JInteger): Integer; cdecl; overload; //(Ljava/lang/Integer;)I
    function compareTo(P1: JObject): Integer; cdecl; overload; //(Ljava/lang/Object;)I

    { Property }
  end;

  TJInteger = class(TJavaGenericImport<JIntegerClass, JInteger>) end;

implementation

procedure RegisterTypes;
begin
  TRegTypes.RegisterType('Androidapi.JNI.java.lang.Integer.JInteger', 
    TypeInfo(Androidapi.JNI.java.lang.Integer.JInteger));
end;


initialization
  RegisterTypes;

end.
